﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace erpWebapiBack.ApplicationDev.mytest
{
    public interface  mytestIBLL
    {
        mytestEntity GetMytestEntity(string keyValue);

        /// <summary>
        /// 委托查询
        /// </summary>
        /// <param name="id"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        mytestEntity GetMytestEntity(string id, string name);

        /// <summary>
        /// SQL 查询数据
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        IEnumerable<mytestEntity> GetMytestEntities(string query);

        /// <summary>
        /// 插入实体
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        int InsertMytest(mytestEntity entity);


        /// <summary>
        /// 批量插入数据
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        int InsertBranchMytest(IEnumerable<mytestEntity> entity);

        /// <summary>
        /// 更新数据
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        int UpdateMytest(mytestEntity entity);


        /// <summary>
        /// 删除一个
        /// </summary>
        /// <param name="mytestEntity"></param>
        /// <returns></returns>
        int DeleteMytest(mytestEntity mytestEntity);

        /// <summary>
        /// 删除多个
        /// </summary>
        /// <param name="mytestEntities"></param>
        /// <returns></returns>
        int DeleteBranchMytest(IEnumerable<mytestEntity> mytestEntities);

        /// <summary>
        /// SQL 语句执行
        /// </summary>
        /// <param name="id"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        int ExecSqlUpdateData(string id, string name);
    }
}
